--[[
function getPlayerTextStorageValue(cid, valueid)
	local tmp = db.getResult("SELECT `value` FROM `player_txt_storage` WHERE `player_id` = "..getPlayerGUID(cid).." AND `valueid`="..valueid..";")
	return tmp:getID() ~= -1 and tmp:getDataString("value") or ''
end

function setPlayerTextStorageValue(cid, valueid, newvalue)
	return db.executeQuery("UPDATE `player_txt_storage` SET `value`= "..db.escapeString(newvalue).." WHERE `player_id`=".. getPlayerGUID(cid) .." AND `valueid`="..valueid..";")
end

function doErasePlayerTextStorageValue(cid, valueid)
	return db.executeQuery("DELETE FROM `player_txt_storage` WHERE `player_id`=".. getPlayerGUID(cid) .." AND `valueid`="..valueid..";")
end
]]

-- <action itemid="1422" event="script" value="campfire.lua"/>
--- Campfire maked by Kronos aka Hellboy ---
local stoneId = {1293, 1295, 1294}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray(stoneId, (getPlayerSlotItem(cid, CONST_SLOT_RIGHT)).itemid) and  isInArray(stoneId, (getPlayerSlotItem(cid, CONST_SLOT_LEFT)).itemid) then
		doRemoveItem(item.uid)
		doDecayItem(doCreateItem(1423, 1, {x = toPosition.x, y = toPosition.y, z = toPosition.z}))
	end
	return true
end